/*-
 * Copyright (C) 2018-2020, Shanghai Trusted Industry Control Platform Co., Ltd.
 * Created by 周正辉 (Zhenghui Zhou) <zhouzhenghui@ticpsh.com>, 赵楷文 (Kaiwen
 * Zhao) <zhaokaiwen@ticpsh.com>
 */

#ifndef COMMON_LOCATELOC_H
#define COMMON_LOCATELOC_H

#include <clang/AST/ASTContext.h>
#include <clang/Basic/SourceLocation.h>
#include <clang/Basic/SourceManager.h>
#include <clang/Lex/Lexer.h>

namespace rocket {
namespace common {

/**
 * @brief getSemiOrRBraceAsEndLoc
 * 将取得的语句/结构尾地址进一步解析取得末尾的分号或右括号
 * @param end
 * @return
 */
clang::SourceLocation getSemiOrRBraceAsEndLoc(clang::SourceLocation end,
                                              const clang::SourceManager& sm,
                                              clang::ASTContext& ast);

}  // namespace common
}  // namespace rocket

#endif  // LOCATELOC_H
